package alo.p6.work2;

import alo.p6.TreeNode;

/**
 * @ClassName SiblingsCount
 * @Description 求结点的兄弟个数
 * @Author Fanxc
 * @DATE 2021/2/2 11:45
 * @Version 1.0
 */
public class SiblingsCount {
    int siblingsCount(TreeNode node){
        int count=0;
        while (node!=null){
            count++;
            node=node.getNextSibling();
        }
        return count;
    }
}
